<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background-color: red;
            /* 圆角边框 */
            /* border-radius: 50%; */
            animation-name: move;
            /* 时间 */
            animation-duration: 2s;
            animation-timing-function: linear;
            animation-iteration-count: infinite;
            /* 反向执行 */
            animation-direction: alternate;
        }
        /* 定义动画关键帧 */
        @keyframes move{
            /* 只需要开始和结束 from 开始 to 结束 */
            /* 需要中间过程0%开始 25% 50% 100% 结束 */
            /* from{
               
                transform: translateX(0px);
            }
            to{
                transform: translateX(200px);

            } */
             0%{
                transform: translateX(0px) rotate(0deg); 
             }
            25%{
                transform: translateX(50px) rotate(90deg); 
                background-color: pink;
                border-radius: 10px;
             }
            50%{
                transform: translateX(100px) rotate(180deg); 
                background-color: orange;
                border-radius: 20px;
             }
            75%{
                transform: translateX(180px) rotate(270deg); 
                background-color: cyan;
                border-radius: 35%;
             }
            100%{
                transform: translateX(270px) rotate(3600deg); 
                background-color: pink;
                border-radius: 50%;
             }
        }
        @keyframes scale {
            from{
                /* 大于一放大 小于一缩小 */
                transform: scale(1.2);

            }
            to{

            }
        }
        img{
            margin-top: 20px;
            animation: scale .2s linear infinite alternate;
        }
    </style>
</head>
<body>
    <div></div> 
    <img width="150px" src="../音视频/1.webp" alt="">
</body>
</html>